//
//  FGVoiceMessageCellData.h
//  FGChatKit
//
//  Created by Henry on 2021/6/3.
//

#import "FGBubbleMessageCellData.h"

NS_ASSUME_NONNULL_BEGIN

@interface FGVoiceMessageCellData : FGBubbleMessageCellData

@property (nonatomic, strong) NSString *path;
@property (nonatomic, strong) NSString *url;

/// 语音类型也是后缀 例如mp3
@property (nonatomic, strong) NSString *type;

/// 间隔（秒）
@property (nonatomic) int duration;
/// 数据大小
@property (nonatomic) int length;

/// 已播放
@property (nonatomic) BOOL played;

@property (nonatomic) BOOL isDownloading;
@property (nonatomic) BOOL isPlaying;

@property (nonatomic, strong) UIImage *voiceImage;
@property (nonatomic, strong) NSArray <UIImage *> *voiceAnimationImages;


/// 文本字体
@property (nonatomic, strong) UIFont *textFont;

/// 文本颜色
@property (nonatomic, strong) UIColor *textColor;


- (void)playVoiceMessage;
- (void)stopVoiceMessage;

- (void)downloadVoice:(NSString *)path progress:(FGDownloadProgress)progress succ:(FGSucc)succ fail:(FGFail)fail;

@end

NS_ASSUME_NONNULL_END
